#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int count_one(unsigned int n)
{
    int count = 0;
    while (n) 
    {
        if (n % 2 == 1) 
        {
            count++;
        }
        n = n / 2;
    }
    return count;
}

int main()
{
    int a = 13;
    scanf("%d", &a);
    int ret = count_one(a);
    printf("%d\n", ret);
    return 0;
}